<div class="issue-link container-fluid">

  <div class="row">
    <div class="list-toolbar col-xl-12">
      <div class="title">
        <span>链接问题</span>
      </div>

      <div class="filter">

      </div>

      <div class="buttons">
        <button (click)="cancel()" type="button" class="btn btn-secondary btn-with-icon btn-sm">
          <i class="fa fa-plus-circle"></i>返回
        </button>
      </div>
    </div>
  </div>

  <div class="row">
    <form [formGroup]="form" class="my-validate-form">
      <div class="form-group row">
        <label class="col-sm-2 col-form-label">此问题</label>
        <div class="col-sm-10">
          <select [(ngModel)]="reasonId" class="form-control" name="linkId" formControlName="linkId">
            <option *ngFor="let item of issueLinkReasons" value="{{item.id}}">{{item.label}}</option>
          </select>
        </div>
      </div>

      <div class="form-group row">
        <label class="col-sm-2 col-form-label">问题</label>
        <div class="col-sm-10">
          <search-select [(searchModel)]="searchModel" [searchResult]="searchResult" [(selectedModels)]="selectedModels"
                         [selectSingle]='true' (searchChange)="changeSearch($event)">
          </search-select>
        </div>
      </div>

      <div class="form-group row">
        <label class="col-sm-2 col-form-label"></label>
        <div class="col-sm-10">
          <button [disabled]="selectedModels.length < 1 || !reasonId"
                  (click)="link()" type="button" class="btn btn-primary">保存</button>
          &nbsp;
          <button (click)="cancel()" type="button" class="btn btn-default">取消</button>
        </div>
      </div>

    </form>

  </div>

</div>
